/***********************************************
 This file is part of redia-bapps-main-ios.
 
 Copyright (c) 2015 Redia A/S
 
 Redia-bapps-main-ios is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 Redia-bapps-main-ios is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with redia-bapps-main-ios.  If not, see <http://www.gnu.org/licenses/>.
 
 *********************************************** */

//
//  BANewsRelatedsButtonViewController.m
//  redia-bapps-ios
//
//  Created by Henrik Lynbech on 10/11/14.
//  Copyright (c) 2014 redia. All rights reserved.
//

#import "BANewsRelatedsButtonViewController.h"
#import "BALibrarySettings.h"
#import "UIImage+MultiplyColor.h"
#import "BARelatedMaterialsData.h"
#import "BARelatedMaterialsListViewController.h"
#import "BARPCManager.h"


@interface BANewsRelatedsButtonViewController ()

@property (weak, nonatomic) IBOutlet UIButton *bottomButton;
@property (weak, nonatomic) IBOutlet UIImageView *rightDisclosureArrowImage;

@end

@implementation BANewsRelatedsButtonViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    BA_LABEL_SET_FONT_LIGHT(self.bottomButton.titleLabel);
    self.rightDisclosureArrowImage.image = [UIImage imageNamed:@"related-disclose-arrow-left" multiplyWithColor:[[BALibrarySettings instance] getCustomerColorNormal]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



- (IBAction)bottomRelatedMaterialsButtonClicked:(id)sender {
    BARelatedMaterialsListViewController* lvc = [BARelatedMaterialsListViewController new];
    [lvc setHeaderText:@"Relaterede materialer"];
    [lvc loadDataFromIdentifiers:self.relatedMaterials];
    [self.navigationController pushViewController:lvc animated:YES];
}

@end
